const path = require('path')
const history = require('connect-history-api-fallback')
const express = require('express')

const app = express()

// 处理 history 模式的中间件
app.use(history())

app.use(express.static(path.join(__dirname, './web')))

app.listen(3000, () => {
  console.log('服务器开启，监听端口 3000')
})
